package com.neusoft.elm.controller;

import com.neusoft.elm.po.Business;
import com.neusoft.elm.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/BusinessController")
public class BusinessController {
@Autowired
private BusinessService businessService;
@PostMapping("/listBusinessByOrderTypeId")
public Object  listBusinessByOrderTypeId(Integer orderTypeId) throws Exception {
    List<Business> list = businessService.listBusinessByOrderTypeId(orderTypeId);
    return list;
}
@PostMapping("/getBusinessById")
public Object getBusinessById(Integer businessId) throws Exception {
    Business business = businessService.getBusinessById(businessId);
    return business;
}

}
